package com.spt3.jfx.controller;

import com.spt3.jfx.config.StageRouter;
import com.spt3.jfx.manager.SecondManager;
import javafx.fxml.FXML;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
@RequiredArgsConstructor
public class SecondaryController {
    @Autowired
    private SecondManager secondManager;
    private final StageRouter router;

    @FXML
    private void switchToPrimary() {
        secondManager.test();
        router.navigateByUrl("/primary");
    }
}